package com.spzx.service.Impl;

import com.spzx.common.core.constant.SecurityConstants;
import com.spzx.common.core.domain.R;
import com.spzx.product.api.RemoteCategoryService;
import com.spzx.product.api.domain.VO.CategoryVO;
import com.spzx.service.CategoryTreeService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class CategoryTreeServiceImpl implements CategoryTreeService {
    @Resource
    RemoteCategoryService remoteCategoryService;
    @Override
    public List<CategoryVO> listTree() {
        R<List<CategoryVO>> categoryTree = remoteCategoryService.getCategoryTree(SecurityConstants.INNER);
        return categoryTree.getData();
    }
}
